import request from "@/api/request";

export default {

    /**
     * 发布帖子
     * @param token
     * @returns {*}
     */
    createCommunication:(param,token)=>{
        return request({
            headers: {'token': token},
            url:"/communication/createCommunication",
            method:"post",
            data: param
        })
    },

    /**
     * 删帖子
     * @param token
     * @returns {*}
     */
    deleteCommunication:(param,token)=>{
        return request({
            headers: {'token': token},
            url:"/communication/delete",
            method:"post",
            data: param
        })
    },

    /**
     * 查帖子
     * @param token
     * @returns {*}
     */
    listCommunication:(param,token)=>{
        return request({
            headers: {'token': token},
            url:"/communication/list",
            method:"post",
            data: param
        })
    },

    /**
     * 评论帖子
     * @param param
     * @param token
     * @returns {*}
     */
    createComment:(param,token)=>{
        return request({
            headers: {'token': token},
            url:"/comment/createCommunication",
            method:"post",
            data: param
        })
    },

    /**
     * 查询帖子评论
     * @param param
     * @param token
     * @returns {*}
     */
    queryComentList:(param,token)=>{
        return request({
            headers: {'token': token},
            url:"/comment/queryComentList",
            method:"post",
            data: param
        })
    },

    /**
     * 删除帖子的评论
     * @param param
     * @param token
     * @returns {*}
     */
    deleteComent:(param,token)=>{
        return request({
            headers: {'token': token},
            url:"/comment/deleteComent",
            method:"post",
            data: param
        })
    },
    /**
     * 查询用户信息
     * @param param
     * @param token
     * @returns {*}
     */
    userInfolist:(param,token)=>{
        return request({
            headers: {'token': token},
            url:"/user/userInfo/list",
            method:"post",
            data: param
        })
    },

}